package com.huamoxi.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huamoxi.entity.Menu;
import com.huamoxi.mapper.MenuMapper;
import com.huamoxi.result.Result;
import com.huamoxi.service.MenuService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service
public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements MenuService {

    @Resource
    private MenuMapper menuMapper;

    @Override
    public Result<Menu> getMenusByRoleId(Long roleId) {
        return menuMapper.getMenusByRoleId(roleId);
    }

    @Override
    public Result<Menu> getMenusByUserId(Long userId) {
        return menuMapper.getMenusByUserId(userId);
    }
}
